using UnityEngine;

namespace ZFramework.Runtime
{
    public static class Log
    {
        private static ILogHelper _logHelper;
        public static void SetLogHelper(ILogHelper helper)
        {
            _logHelper = helper;
        }

        public static void Error(string format, params object[] args)
        {
            var message = Utility.Text.Format(format, args);
            _logHelper.Error(message);
        }

        public static void Error(string message)
        {
            _logHelper.Error(message);
        }

        public static void Info(string format, params object[] args)
        {
            var message = Utility.Text.Format(format, args);
            _logHelper.Info(message);
        }

        public static void Info(string message)
        {
            _logHelper.Info(message);
        }

        public static void Warning(string format, params object[] args)
        {
            var message = Utility.Text.Format(format, args);
            _logHelper.Warning(message);
        }

        public static void Warning(string message)
        {
            _logHelper.Warning(message);
        }
    }
}
